package com.todo.event.activity.common.base;

/**
 * @author azhebuxing
 * @date 2025/1/7 13:24
 * @description
 */
public class EventKeyBuild {

    public static String buildEventDetailKey(String eventCode) {
        return String.format(EventRedisKey.EVENT_DETAIL_KEY, eventCode);
    }

    public static String buildEventDecisionKey(Long decisionId) {
        return String.format(EventRedisKey.EVENT_DECISION_KEY, decisionId);
    }

    public static String buildEventDecisionCodeMapKey(String eventCode) {
        return String.format(EventRedisKey.EVENT_DECISION_CODE_MAP_KEY, eventCode);
    }

    public static String buildEventActivityInfoDecisionKey(Long decisionId) {
        return String.format(EventRedisKey.EVENT_ACTIVITY_INFO_DECISION_KEY, decisionId);
    }

    public static String buildEventCodeRelationKey(String topicName, String tag) {
        return String.format(EventRedisKey.EVENT_CODE_RELATION_KEY, topicName, tag);
    }

    public static String getEventActivityHbaseTableName() {
        return EventRedisKey.EVENT_ACTIVITY_HBASE_TABLE;
    }

    public static String getEventActivityHbaseFamilyName() {
        return EventRedisKey.EVENT_ACTIVITY_HBASE_FAMILY_NAME;
    }

    public static String buildEventActivityHbaseRowKey(Long userId, String eventUK) {
        return userId + "_" + eventUK;
    }

    public static String buildEventActivityHbasePrefixRowKey(Long userId) {
        return userId + "_";
    }

    public static String buildDecisionFieldExpKey(Long decisionId) {
        return String.format(EventRedisKey.DECISION_FIELD_EXP_KEY, decisionId);
    }
}
